package com.mtnz.njk.Mapper;

import com.mtnz.njk.entity.AskEntity;
import com.mtnz.njk.model.AskModel;
import com.mtnz.njk.model.UserAskModel;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface AskMapper extends Mapper<AskEntity> {
    /**
     * 提问详情
     * @param askId
     * @return
     * @throws Exception
     */
    AskModel showAsk(String askId)throws Exception;

    /**
     * 提问信息
     */
    AskEntity findAskById(String askId)throws Exception;

    /**
     * 我的提问
     */
   List<UserAskModel> findUserAsk(String userId)throws Exception;

    /**
     * 提问详情
     */
    UserAskModel findById(String askId)throws Exception;

    /**
     * 分享数
     */
    AskEntity shareViews(String askId)throws Exception;
}
